﻿<UserControl x:Class="WavSubscriptionDemo.StatControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="200" d:DesignWidth="500">
    
    <UserControl.Resources>
        <Style TargetType="{x:Type TextBlock}">
            <Style.Setters>
                <Setter Property="FontSize" Value="36" />
                <Setter Property="FontWeight" Value="Bold" />
                <Setter Property="Margin" Value="5 0" />
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="VerticalAlignment" Value="Bottom" />
            </Style.Setters>
        </Style>
        
        <Style TargetType="{x:Type Label}">
            <Style.Setters>
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="VerticalAlignment" Value="Top" />
            </Style.Setters>
        </Style>
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="2*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        
        <TextBlock Text="{Binding Path=SamplesPerSecond}" />
        <Label Content="Measurements / Second" Grid.Row="1" />
        
        <TextBlock Text="{Binding Path=KilobitsPerSecond}" Grid.Column="1" />
        <Label Content="kbps" Grid.Row="1" Grid.Column="1" />

        <TextBlock Text="{Binding Path=Smoothness}" Grid.Column="2" />
        <Label Content="Smoothness" Grid.Row="1" Grid.Column="2" />
        
        <TextBlock Text="{Binding Path=FractionSamplesLost}" Grid.Column="3" />
        <Label Content="Fraction of Loss" Grid.Row="1" Grid.Column="3" />
    </Grid>
</UserControl>
